Skip to content

Conversation

@lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Feb 21, 2025

By default we have maxOutputLines == 1000. Once you get to 1000 elements it starts to splice the output to only keep the last 1000. But then the same array index maps to a different output entry component. Which means all of them get re-rendered at once.

By adding a persistent key to each shell output entry react won't lose track of or think that the components completely changed.

As a reminder, sync-to-compass is your friend for testing this locally:

~/mongo/mongosh/packages/browser-repl/scripts % export COMPASS_HOME=/Users/leroux.bodenstein/mongo/compass
~/mongo/mongosh/packages/browser-repl/scripts % node sync-to-compass.js

Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@lerouxb lerouxb merged commit 1765a50 into main Feb 24, 2025
45 of 48 checks passed
@lerouxb lerouxb deleted the fix-maxOutputLength branch February 24, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants